<?php
namespace app\admin\validate;
use think\Validate;

class ModelFields extends Validate{
    //验证规则
    protected $rule=[
        'model_id'=>'require',
        'field_cname' => 'require|unique:model_fields',
        'field_ename' => 'require|unique:model_fields',
        'field_type'=>'require',

    ];
    protected $message=[
        'field_cname.require'=>'字段中文名称不能为空!',
        'field_cname.unique'=>'字段中文名称不能重复!',
        'field_ename.require'=>'字段英文名称不能为空!',
        'field_ename.unique'=>'字段英文名称不能重复!',
        'model_id.require'=>'所属模型不能为空!',
        'field_type'=>'字段类型不能为空!',

    ];


}
